<?php
include_once "../header1.php";
?>
</head>
<body>
<?php
include_once ("$basedir"."/Login/databaseconnection.php");

if(!loggedin())
{
	require_once ("$basedir"."/index.php");
}
 else
   {
   if(isset($_POST['ADD']))
{
require_once 'insertexam.php';
}
?>
 <?php
include_once "../header2.php";
?>
<?php
include_once "topmenu.php";
?>
<div class="left">
  
<div class="article">

<form action="#" method="POST">
<br/>
<table>
<tr>
<td width="502" height="21">
<?php
if(isset($_POST['ADD']))
{
	if(isset($_SESSION['errorin']))
	{
		echo $_SESSION['errorin'];
		unset($_SESSION['errorin']);
	}
	if(isset($_SESSION['error']))
	{
		echo $_SESSION['error'];
		unset($_SESSION['error']);
		
	}
}
?></td>
</tr>
</table>
   <table width="428" border="0">
     <tr>
       <td width="42">&nbsp;</td>
       <td width="317" height="32">School Id</td>
       <td width="9">:-</td>
	   
       <td width="42"><select name="School_Id" id="select">
      <?php
	  
	  if(isset($_POST['ADD']))
	  {
	 echo '<option value="'.$School_Id.'">'.$School_Id.'</option>';
	  }
	  else
	  {
	  echo '<option value="Select One">Select One</option>';
	  }
	  ?>
      <?php
	  $scho=mysql_query("SELECT DISTINCT(School_Id) FROM school");
	 while($row=mysql_fetch_array($scho))
  {
	  $Sch_Id=$row['School_Id'];
if($School_Id!=$Sch_Id)
{
	  echo '<option value="'.$Sch_Id.'">'.$Sch_Id.'</option>';
}
  }
	  ?>
    </select></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td height="32">Exam Name</td>
       <td>:-</td>
	   <?php
	   if(isset($_POST['ADD']))
{
echo '<td>';
echo "<input type='text' name='Exam_Name' value='$Exam_Name'/>";
echo '</td>';

}
else
{
echo '<td>';
echo "<input type='text' name='Exam_Name'/>";
echo '</td>';

}?>
       <td></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td height="32">Year</td>
       <td>:-</td>
	   <?php
	   if(isset($_POST['ADD']))
{
echo '<td>';
echo "<input type='text' name='Year' value='$Year'/>";
echo '</td>';

}
else
{
echo '<td>';
echo "<input type='text' name='Year'/>";
echo '</td>';

}?>
       <td></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td height="32">Number Of Sat_Students</td>
       <td>:-</td>
	   <?php
	   if(isset($_POST['ADD']))
{
echo '<td>';
echo "<input type='text' name='No_Of_Sat_Students' value='$No_Of_Sat_Students'/>";
echo '</td>';

}
else
{
echo '<td>';
echo "<input type='text' name='No_Of_Sat_Students'/>";
echo '</td>';

}?>
       <td></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td height="32">Number Of Passed_Students</td>
       <td>:-</td>
	   <?php
	   if(isset($_POST['ADD']))
{
echo '<td>';
echo "<input type='text' name='No_Of_Passed_Students' value='$No_Of_Passed_Students'/>";
echo '</td>';

}
else
{
echo '<td>';
echo "<input type='text' name='No_Of_Passed_Students'/>";
echo '</td>';

}?>
       <td></td>
     </tr>
     <tr>
       <td><a href="insert.php"></a></td>
       <td colspan="3"><a href="insert.php"><strong>Reset | </strong></a>
             <input type="submit" value="ADD" name="ADD"/>
      </td>
       </tr>
   </table>
</form>
</div>
</div>

<div class="rightmenu"> 
<?php
include_once "menu.php";
?>
<?php
include_once "../footer.php";
?>
<?php
}
?>
</body>
</html>